As performance of a terminal device increases, power consumption of the terminal device becomes larger. To resolve a contradiction between high performance and low power consumption of the terminal device, power consumption of the terminal device needs to be controlled.
In the prior art, there has been a solution in which power consumption of a terminal device is controlled by identifying an application scenario. A principle of the solution is that: a central processing unit (CPU), a graphics processing unit (GPU), and a liquid crystal display (LCD) are controlled after different application scenarios are identified, thereby completing control on power consumption of the terminal device.
In the prior art, the solution of identifying an application scenario is implemented by monitoring a bottom-layer key event. A specific monitoring process may be that: A system application programming interface (API) related to a hardware operation is monitored by using a kernel; when it is detected that a kernel event occurs, that is, invoking of the system API occurs, then hardware use information is analyzed, and scenario information is obtained; and then, hardware power consumption is determined, and power consumption is controlled.
It is found that, in the prior art, a kernel monitoring event is related to a bottom layer, and several different upper-layer scenarios may be corresponding to one or more bottom-layer events of a same series. In this case, it is not accurate enough to identify an application scenario, which affects user experience.